<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>文章页面</title>
  <link rel="stylesheet" href="../static/layui/css/layui.css">
  <link rel="stylesheet" href="../static/admin/css/app.css">
  <link rel="stylesheet" href="../static/font-awesome/css/font-awesome.min.css" media="all">
  <link rel="stylesheet" href="../static/editor.md/css/editormd.min.css" media="all"> 
</head>
<body>
    <!-- 公共头部  start-->
    <div class="nav-title" style="display: none;">
        <div class="tl fl">
            文章添加
        </div>
        <div class="tr fr">
            <button class="layui-btn layui-btn-radius layui-btn-primary layui-btn-xs" onclick="javascript:history.go(-1);"><i class="fa fa-arrow-left" aria-hidden="true"></i></button>
            <button class="layui-btn layui-btn-radius layui-btn-primary layui-btn-xs" onclick="javascript:window.location.reload();"><i class="fa fa-refresh" aria-hidden="true"></i></button>

        </div>
    </div>
    <!-- 公共头部 end-->

    <div class="layui-layout layui-layout-admin pp-main" style="margin-top:20px">
	    <form class="layui-form pp-form" action="" method="post" >
            <div class="layui-form-item">
                <label class="layui-form-label">所属栏目</label>
                <div class="layui-input-inline">
                    <select name="cate_id" lay-verify="required"  lay-search="" style="width: 100%">
                        <option value=""></option>
                        
                        <option value="1">计算机</option>
                        <option value="2">电脑</option>
                        
                    </select>
                </div>
                <div class="layui-form-mid layui-word-aux">*</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-inline width40">
                    <input type="text" name="title" id="title" lay-verify="required" autocomplete="off" placeholder="不超过100字" class="layui-input" value="">
                </div>
                <div class="layui-form-mid layui-word-aux">*</div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">标签</label>
                <div class="layui-input-inline width80">
                    <input type="text" name="tag" id="tag" lay-verify="required" autocomplete="off" placeholder="多个标签使用英文逗号隔开" class="layui-input" value="">
                </div>
                <div class="layui-form-mid layui-word-aux"></div>
            </div>

            <div class="clear"></div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="sub">保存</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
	</div>

<script src="../static/layui/layui.js"></script>
<script src="../static/public/js/jquery.min.js?t=13"></script>
<script src="../static/editor.md/editormd.js"></script>

<script>
    layui.use(['form','element','jquery','layer'], function(){
        
  

        var form = layui.form;
        var element = layui.element;
        var $ = layui.jquery;
        var layer = layui.layer;

        form.on('submit(sub)', function(data){
            window.parent.layer.closeAll();
            window.parent.location.reload();
            // var form_data = data.field;
            // $.post('./dd', form_data, function (out) {
            //     if (out.status == 0) {
            //         layer.msg(out.msg,{icon: 1,time:1000},function () {
            //             window.parent.layer.closeAll();
            //             window.parent.location.reload();
            //         })
            //     } else {
            //         layer.msg(out.msg)
            //     }
            // }, "json");
            return false;
        });

        element.render();

    });
</script>


</body>
</html>